Research of the Distribution of Tongue Features of Diabetic Population Based on Unsupervised Learning Technology

Background The prevalence of diabetes increases year by year, posing a severe threat to human health. Current treatments are difficult to prevent the progression of diabetes and its complications. It is imperative to carry out individualized treatment of diabetes, but current diagnostic methods are difficult to specify an individualized treatment plan. Objective Clarify the distribution law of tongue features of the diabetic population, and provide the diagnostic basis for individualized treatment of traditional Chinese medicine (TCM) in the treatment of diabetes. Methods We use the TFDA-1 tongue diagnosis instrument to collect tongue images of people with diabetes and accurately calculate the color features, texture features, and tongue coating ratio features through the Tongue Diagnosis Analysis System (TDAS). Then, we used K-means and Self-organizing Maps (SOM) networks to analyze the distribution of tongue features in diabetic people. Statistical analysis of TDAS features was used to identify differences between clusters. Results The silhouette coefficient of the K-means clustering result is 0.194, and the silhouette coefficient of the SOM clustering result is 0.127. SOM Cluster 3 and Cluster 4 are derived from K-means Cluster 1, and the intersections account for (76.7% 97.5%) and (22.3% and 70.4%), respectively. K-means Cluster 2 and SOM Cluster 1 are highly overlapping, and the intersection accounts for the ratios of 66.9% and 95.0%. K-means Cluster 3 and SOM Cluster 2 are highly overlaid, and the intersection ratio is 94.1% and 82.1%. For the clustering results of K-means, TB-a and TC-a of Cluster 3 are the highest (P < 0.001), TB-a of Cluster 2 is the lowest (P < 0.001), and TB-a of Cluster 1 is between Cluster 2 and Cluster 3 (P < 0.001). Cluster 1 has the highest TB-b and TC-b (P < 0.001), Cluster 2 has the lowest TB-b and TC-b (P < 0.001), and TB-b and TC-b of Cluster 3 are between Cluster 1 and Cluster 2 (P < 0.001). Cluster 1 has the highest TB-ASM and TC-ASM (P < 0.001), Cluster 3 has the lowest TB-ASM and TC-ASM (P < 0.001), and TB-ASM and TC-ASM of Cluster 2 are between the Cluster 1 and Cluster 3 (P < 0.001). CON, ENT, and MEAN show the opposite trend. Cluster 2 had the highest Per-all (P < 0.001). SOM divides K-means Cluster 1 into two categories. There is almost no difference in texture features between Cluster 3 and Cluster 4 in the SOM clustering results. Cluster 3's TB-L, TC-L, and Per-all are lower than Cluster 4 (P < 0.001), Cluster 3's TB-a, TC-a, TB-b, TC-b, and Per-part are higher than Cluster 4 (P < 0.001). Conclusions The precise tongue image features calculated by TDAS are the basis for characterizing the disease state of diabetic people. Unsupervised learning technology combined with statistical analysis is an important means to discover subtle changes in the tongue features of diabetic people. The machine vision analysis method based on unsupervised machine learning technology realizes the classification of the diabetic population based on fine tongue features. It provides a diagnostic basis for the designated diabetes TCM treatment plan.


Introduction
e number of diabetic patients worldwide is increasing rapidly, posing a major threat to human health [1]. Limited by diagnostic methods, current treatment guidelines are difficult to provide individualized treatment plans. erefore, existing treatment methods are still difficult to prevent the progression of diabetes and the occurrence and development of complications. Further refined classification of diabetes is conducive to individualized treatment [2]. Syndrome differentiation and treatment of TCM is the practice of individualized treatment. e patient's disease information is collected through tongue diagnosis, pulse diagnosis, and questioning, and the disease is further classified through analysis to formulate an individualized treatment plan [3,4]. Among them, tongue diagnosis is convenient and noninvasive and can reflect a lot of physiological and pathological information about the human body, so it is an indispensable diagnostic method of TCM [5].
Tongue diagnosis is a classic diagnosis method of TCM. TCM doctors evaluate the disease state by observing changes in tongue body (TB) and tongue coating (TC). ey have a long history and rich practical experience. However, on the one hand, due to the influence of light, temperature, humidity, and viewing angle, subtle changes in the color and texture of the tongue require well-trained and experienced physicians to observe. On the other hand, the written tongue diagnosis information is inevitably subjective through visual observation. In order to further improve the standardization and information level of TCM diagnosis, the tongue diagnosis instrument was invented. e tongue diagnosis instrument is equipped with a high-definition camera and a standard light source, which can capture a flat and clear tongue image. It can effectively extract tongue image features with computer image processing technology. ese digital tongue features can more accurately characterize the different states of the disease.
Machine learning has been widely used in the field of tongue diagnosis, but the current research focuses on the field of supervised learning, which requires manual calibration of the tongue image [6][7][8]. It is not difficult to label data with clear diagnostic criteria. However, applying highdimensional digital tongue features to the classification of the diabetic population is a new research field, and it is difficult to give clear diagnostic criteria, which makes it difficult to explore its internal laws. Unsupervised learning can discover the inherent laws of unlabeled data [9,10]. Given this, we introduce unsupervised learning technology to study the changing laws of tongue image in different states of the diabetic population and use various methods to evaluate the reliability of the clustering results ( Figure 1). Our research will provide an effective analysis method for the classification of the tongue image of diabetes and provide a basis for developing individualized treatment plans.

Study Population.
e subjects participating in our study came from Shuguang Hospital affiliated to Shanghai University of TCM and several Shanghai community hospitals. e data collection period is from August 6, 2018, to December 31, 2019. According to the diagnostic criteria issued by ADA 2020 [11], it is determined that subjects with diabetes have fasting blood glucose ≥ 7.0 mmol/L, blood glucose two hours after a meal ≥ 11.1 mmol/L, or HbA1c ≥ 6.5%. A total of 598 diabetic subjects were included in the study (Table 1). All subjects signed an informed consent form. e study was approved by the IRB of Shuguang Hospital affiliated with Shanghai University of TCM.

Tongue Image Collection and Analysis.
e intelligent diagnosis technology research team independently developed the TFDA-1 tongue diagnosis instrument ( Figure 2) at the Shanghai University of TCM. It is equipped with a standard light source and a high-definition camera, which can take images of the subject's tongue in a stable light environment.
e Tongue Diagnosis Analysis System (TDAS) is used to extract features from tongue images. TDAS can realize the segmentation of tongue body (TB) and tongue coating (TC) [12] and calculate the color feature, texture feature, and tongue coating ratio feature of TB and TC, respectively. Color features include RGB, Lab, YCrCb, and other color space features. In order to facilitate data analysis and interpretation, we chose the color feature of the Lab color space. L is used to indicate brightness, the larger the L value, the brighter, and vice versa, the darker; a indicates the range from red to green, a positive value indicates red, a higher value indicates red, a negative value indicates green, and a lower value indicates green; b indicates the range from yellow to blue, with positive values representing yellow, higher values being more yellow, negative values representing blue, and lower values being blue. Texture features include angular second moment (ASM), entropy (ENT), contrast (CON), and mean (MEAN). ASM has the opposite meaning of ENT, CON, and MEAN. e larger the ASM, the smaller the ENT, CON, and MEAN, and the finer the texture of the tongue, and vice versa. Per-all is inversely proportional to Per-part. e larger the Per-all, the smaller the Per-part, the larger the tongue coating area, and vice versa.

Cluster Analysis.
e data analyzed by the clustering algorithm are uncalibrated data. In order to evaluate the reliability of the clustering results, we chose K-means and Self-Organizing Maps (SOM) Network to confirm each other [13,14]. t-SNE and K-means are implemented and performed in Scikit-learn version 0.23.2 [15].

K-Means Algorithm.
Let X be the tongue feature and the dimension be n; then X � x i : i � 1, · · · , n . Let the clustering result be C and be divided into k clusters; then C � C j : j � 1, · · · , k [16].
First, k samples μ 1 , μ 2 , · · · , μ k are randomly selected from X as initial cluster centers. Calculate the distance d ij � ‖x i − μ j ‖ 2 from the sample x i to each cluster center μ j (1 < j < k).
e cluster center closest to the sample is recorded as the category of the sample λ i � argmin j∈ 1,2,···,k { } d ij , and the sample x i is placed in the corresponding cluster en calculate the new cluster center μ j ′ , Evidence-Based Complementary and Alternative Medicine e K-means algorithm needs to specify the number of clusters k value and determine the real k value through the elbow method. As the number of clusters k increases, the division of clusters becomes more and more refined. e sum of the squared errors (SSE) will gradually become smaller (Equation (1)). When k is less than the true number of clusters, the decrease in SSE increases. When k is greater than the number of true clusters, the decrease in SSE tends to    Evidence-Based Complementary and Alternative Medicine be flat. e relationship graph between SSE and k presents an elbow shape, and the k value corresponding to the elbow is the true number of clusters ( Figure 3).
where C i is the i cluster, p is the sample in C i , and m C i is the mean value of all samples in C i .

SOM Networks.
SOM can classify uncalibrated data without additional help. Compared with K-means, there is no need to set the number of categories in advance, and the initial impact is small. Introduce the competitive learning mechanism, and determine the winning neuron by calculating the similarity. e spatial position of the output neuron in the topographic map corresponds to the specific domain or feature drawn from the input space. Finally, the input high-dimensional signal is converted into a two-dimensional discrete map [17].
Let the dimension of tongue feature be N and the number of neurons in the computational layer be M. en the tongue feature is expressed as X � x i : i � 1, · · · , N and the network weight can be expressed as W j � w ji : j � 1, · · · , M; i � 1, · · · , N}.
Normalize the input vector and network weight: Input the sample into the network, the sample and the weight vector do a dot product, the output neuron with the largest dot product value wins the competition, and it is recorded as the winning neuron.
Update the neurons in the topological neighborhood of the winning neuron, and renormalize the learned weights.
Update the learning rate η and the topological neighborhood so that the distance becomes smaller as time increases. If η ≤ η min or reach the preset number of iterations, the algorithm ends.  Barnes-Hut t-SNE converts the distance relationship into a probability distribution, which can efficiently perform dimensionality reduction calculations for high-dimensional nonlinear tongue feature data. Table 2 shows the key parameters we set for the t-SNE algorithm.

Statistical Analysis.
e statistical analysis program is coded in Python version 3.8.8. Multiple independent samples are compared using the Kruskal-Willis H test in SciPy version 1.4.1 [18], and the post hoc analyses are performed using the Conover test in Scikit-posthocs 0.6.7 [19]. Machine learning and silhouette coefficient are implemented in Scikit-learn version 0.23.2. Statistical image drawing is implemented in Seaborn version 0.11.1 [20] and Matplotlib version 3.2.2 [21].
where a is the mean distance between a sample and all other points in the same cluster and b is the mean distance between a sample and all other points in the next nearest cluster.   We performed statistical analysis on the clustering results of K-means. Cluster 2 had the highest TB-L and TC-L (P < 0.001). Cluster 1 had the lowest TB-L (P < 0.05, P < 0.001), and Cluster 1 had the lowest TC-L (P < 0.001). TB-L of Cluster 3 is between Cluster 1 and Cluster 2 (P < 0.05; P < 0.001), TB-L of Cluster 3 was between Cluster 1 and Cluster 2 (P < 0.05; P < 0.001), and the TC-L of Cluster 3 was between Cluster 1 and Cluster 2 (P < 0.001) (Figure 7). Cluster 3 had the highest TB-a and TC-a (P < 0.001), Cluster 2 had the lowest TB-a (P < 0.001), and TB-a of Cluster 1 was between Cluster 2 and Cluster 3 (P < 0.001) (Figure 8).
e Per-part of Cluster 2 was the lowest (P < 0.001), the Per-part of Cluster 3 was the highest Evidence-Based Complementary and Alternative Medicine 7 (P < 0.01, P < 0.001), and the Per-part of Cluster 1 was between Cluster 2 and Cluster 3 (P < 0.01; P < 0.001) ( Figure 14). Figure 15 shows the representative tongue images in the three groups. SOM divides K-means Cluster 1 into two categories. rough statistical analysis, it was found that there was almost no difference in texture features between Cluster 3 and Cluster 4 of SOM. Cluster 3's TB-L, TC-L, and Per-all were lower than Cluster 4 (P < 0.001), Cluster 3's TB-a, TCa, TB-b, TC-b, and Per-part were higher than Cluster 4 (P < 0.001) (Figure 16 and Table 3). Table 4 shows the results of the statistical analysis of the laboratory tests based on K-means clustering. Table 5 shows the results of the statistical analysis of the laboratory tests based on SOM clustering.

Discussion
In order to comprehensively and objectively characterize the tongue image, the tongue features extracted by the TDAS include high-dimensional structural data such as color features, texture features, and tongue coating ratio features.  Evidence-Based Complementary and Alternative Medicine ese fine tongue features describe tongue changes from multiple angles and explain the tiny differences in tongue features of different states of disease. It is difficult for us to use manual observation and general statistical methods to measure the internal correlation of tongue features and specify diagnostic criteria. Clustering algorithms group samples with similar characteristics into a group through repeated iterations, and are often used to identify outliers, explore the inherent laws of complex data, and make predictions [22,23].
An adequate evaluation of the clustering results is necessary for reaching a reliable conclusion. We take many measures to evaluate the clustering results. Firstly, K-means and SOM are used to calculate the results of two completely different clustering algorithms and confirm each other. rough the t-SNE algorithm and Venn diagram to visually analyze the clustering results, K-means Clusters and SOM Clusters are highly overlapping. Next, through statistical analysis, it is found that there are extremely significant differences in the tongue features Evidence-Based Complementary and Alternative Medicine between the clusters, which proves that the differences between the clusters are extremely large. Finally, by displaying the representative tongue samples of each cluster, it is found that the differences are visible to the naked eye. e classification of the diabetic population based on the tongue features provides a new understanding of the heterogeneity of diabetes. We found that the tongues of people with diabetes are divided into three types through cluster analysis. e first type of tongue is characterized by a red tongue and a dry and rough tongue; the second type of tongue is characterized by a purple tongue and a large and thick tongue coating; the third type of tongue is mainly characterized by its fine texture. Chinese medicine believes that the first tongue is a sign of heat syndrome, the second tongue is a sign of phlegm and blood stasis, and the third tongue is a sign of deficiency syndrome. e above classification is expected to provide an objective basis for the individualized treatment of diabetes and has potential clinical value. K-means divides the diabetic population into 3 categories, while SOM divides the diabetic population into 4 categories, of which two clusters are highly overlapping. SOM subdivides one cluster in K-means into two categories. e difference between the two categories is mainly reflected in the color features and coating ratio features. Our research proves that digital tongue features can characterize subtle changes in the tongue of diabetic people. High-precision image measurement technology combined with unsupervised machine learning technology is the key means to discover this difference.
Our research found that machine vision can keenly perceive the subtle changes in the tongue of diabetic patients and realize the fine classification of the diabetic population, providing a diagnosis basis for the individualized treatment of diabetes in TCM. We verify each other through two clustering algorithms with completely different mechanisms.       Statistical analysis, t-SNE, Venn diagram visualization analysis, and tongue image examples fully prove the reliability of the clustering results. However, our data lack information on the course of the disease, and it is impossible to further infer the evolutionary law of tongue features in the course of diabetes.

Conclusion
e fine tongue features calculated by TDAS are the basis for classifying the diabetic population. We have discovered the inherent law of tongue features of people with diabetes through unsupervised machine learning technology. e application of statistical analysis to compare the differences between the clusters clarified the meaning of the tongue features of each cluster. Our study laid the foundation for implementing individualized treatment of diabetes in TCM. In the future, we will expand the sample size and build a standard tongue feature database for diabetic population classification.

Data Availability
e experimental data used to support the findings of this study were supplied by Prof. Jiatuo Xu under license and thus cannot be made freely available. Requests for access to these data should be made to Prof. Jiatuo Xu (e-mail: xjt@ fudan.edu.cn).

Disclosure
Jun Li and Longtao Cui are joint first authors.

Conflicts of Interest
e authors declare that they have no conflicts of interest.